package com.iotek.ssm.service.impl;

import com.iotek.ssm.mapper.ApplySheetMapper;
import com.iotek.ssm.pojo.ApplySheet;
import com.iotek.ssm.pojo.ApplySheetQueryVo;
import com.iotek.ssm.pojo.CustomQueryVo;
import com.iotek.ssm.service.ApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("applyService")
public class ApplyServiceImpl implements ApplyService {

    @Autowired
    private ApplySheetMapper applySheetMapper;

    public void addApply(ApplySheet applySheet) throws Exception {
        applySheetMapper.addApplyInformation(applySheet);
    }

    public void updateApply(ApplySheet applySheet) throws Exception {
        applySheetMapper.updateApplyInformation(applySheet);
    }

    public List<ApplySheet> findApplyList(ApplySheetQueryVo applySheetQueryVo) throws Exception {
        return applySheetMapper.findApplyInformation(applySheetQueryVo);
    }

    public List<ApplySheet> findAllApply() throws Exception {
        return applySheetMapper.findAllApply();
    }
    public List<ApplySheet> findAllApplyLimit(CustomQueryVo customQueryVo) throws Exception{
        return applySheetMapper.findAllApplyLimit(customQueryVo);
    }

    public Integer findAllApplyCounts()throws Exception{
        return applySheetMapper.findAllApplyCounts();
    }
}
